<? session_start();
require "../../../global.php";//$dirname."/".
require RootDir."/"."inc/config.php";
require RootDir."/"."inc/Uifunction.php";
require RootDir."/".$SystemConest[1]."/UIFunction/adminClass.php";
require RootDir."/".$SystemConest[1]."/system/Config.php";
require RootDir."/".$SystemConest[1]."/system/menusys/function.php";

$mydb=new YYBDB();
CheckRule($MenuId,$mydb,$SystemTablename[2],"");//检查登陆权限

$CurrMenuId=$_REQUEST["CurrMenuId"];
if(strlen($CurrMenuId)<1)
$CurrMenuId=0;

if(GetMenu2Num($CurrMenuId)<1)
{
	$mydb=new YYBDB();
	$sqlrs="delete  from ".$SystemConest[7].$SystemTablename[2]." where ".$SystemTablename[2]."0=".$CurrMenuId;
	$returnNum=$mydb->db_update_query($sqlrs);

	if($returnNum>0)
		MessgBox("/".$SystemConest[1]."/Iamges/Right.jpg","删除成功!","Index.php");
	else
		MessgBox("/".$SystemConest[1]."/Iamges/Error.jpg","删除失败!","Index.php");	
}
else
{
	MessgBox("/".$SystemConest[1]."/Iamges/Error.jpg","请先删除子栏目!","Index.php");
}
?>
<script language="javascript">
  window.parent.frames.item("leftFrame").location.reload(); 
</script>